package com.acad_horizon.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import com.acad_horizon.pojo.Member;
import com.acad_horizon.service.MemberService;

@Controller
public class MemberController {

    @Autowired
    private MemberService memberService;


    @RequestMapping("getUserById")
    public String getUserById(Integer id, Model model){
        System.out.println("welcome in controller..... ");
        Member member = memberService.getUserById(id);
        model.addAttribute(member);
        System.out.println("good byb controller.....");
        return "jsp/test.jsp";
    }


}